package com.icloud.system.boot.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.icloud.common.web.util.ObjectUtil;
import com.icloud.system.api.dto.SaveAppOperationLogDto;
import com.icloud.system.boot.mapper.AppOperationLogMapper;
import com.icloud.system.boot.model.AppOperationLog;
import com.icloud.system.boot.service.AppOperationLogService;
import org.springframework.stereotype.Service;


/**
 * App操作日志service实现类
 */
@Service
public class AppOperationLogServiceImpl extends ServiceImpl<AppOperationLogMapper, AppOperationLog> implements AppOperationLogService {

    /**
     * 添加客户操作日志
     */
    @Override
    public void addAppOperationLog(SaveAppOperationLogDto dto) {
        AppOperationLog appOperationLog = new AppOperationLog();
        BeanUtil.copyProperties(dto, appOperationLog, ObjectUtil.getNullField(dto));
        save(appOperationLog);
    }
}
